<include file="App/Admin/View/Public/left.html"/>
<div class="admin">
<form method="post" action="{:U('User/add')}">
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder"> 管理员列表</strong></div>
  <div class="padding border-bottom">  
  <button type="submit" class="button border-yellow"><span class="icon-plus-square-o"></span> 添加管理员</button>
  </div>
  <table class="table table-hover text-center">
    <tr>
      <th width="5%">用户ID</th>
      <th width="15%">用户名</th>
      <th width="10%">邮箱</th>
	  <th width="10%">电话</th>
      <th width="15%">状态</th>
      <th width="10%">操作</th>
    </tr>
   <volist name="list" id="vo">
    <tr>
      <td>{$vo.id}</td>         
      <td>{$vo.username}</td>
	  <td>{$vo.email}</td>
      <td>{$vo.phone}</td>
	  <td>
        <switch name="vo['status']">
        	<case value="0">超级管理员</case>
            <case value="1">管理员</case>
            <case value="2">禁用</case>
        </switch>
      </td>
      <td>
      <if condition="(session('state') EQ 0)">
		<div class="button-group">	<a class="button border-blue" href="{:U('User/edit',array('id'=>$vo['id']))}"><span class="icon-edit text-blue"></span> 修改</a>
		 </div>     
		<div class="button-group">	<a class="button border-red" href="javascript:if(confirm('确定要删除吗？'))location='{:U('User/del',array('id'=>$vo['id']))}'"><span class="icon-trash-o"></span> 删除</a></div>
    <else/>
    
    <div class="button-group">  <a class="button border-blue" href="{:U('User/edit',array('id'=>$vo['id']))}" ><span class="icon-edit text-blue"></span> 修改</a></if>
     </div>
     
    </if>
	</td>
    </tr>
	
    </volist>
	<!--<tr>
        <td colspan="8"></td>
      </tr>-->
  </table>
  
</div>
<div class="pagelist">{$page} </div>
</form>
<script>
  function aa(){
    alert('没权限')
  }
</script>